ABOUT

성능과 운영 안정성을 함께 끌어올리는 개발자입니다.

92% Positional Error Reduction
79% p95 Latency Improvement
90%+ Long Tasks Reduction

2022.02 · 한국장학재단

우수 멘티

한국장학재단 사회 리더 대학생 멘토링 IT

2022.10 · 동작구청

우수 인재상

동작구청 우수 SW 인재

2025.05 · (주) 그랩

프로그래밍 우수상

(주) 그랩 우수 프로그램 개발

2025.05 · AWSKRUG

AWS한국사용자모임 발표

AI agent 스크립트 튜닝 관련 발표

ComputerScience

Development

Engineering

Trouble Shooting

GUESTBOOK

첫 마음부터
함께 나누는 온기

방명록 작성하러 가기

SUBSCRIBE

최신소식을
편하게 만나보세요.

Error

 

정의

한줄 요약

💡개발 시 발생하는 프로그램의 에러입니다.

💡 상황에 따른 에러를 세분화해놓으면 개발효율이 높아집니다.

 


특징

한줄 요약

💡 서론


목차

한줄 요약

 

 

IDE

💡 Reference Error

// 단어오타가 있을 경우
consle.log("Hello");

 

💡  Syntax Error 

// 기호오타가 있을 경우
console.log("Hello);

 

💡 list should have a unique "key" prop

// key가 식별가능한 유일성을 가지지 못한 경우
const ExampleList = [
	{name: "yi"},
    {name: "jo"}
];

...

{ExampleList?.map((item)=>{
	<ul key={new Date()}>
     <li>{item?.name}</li>   
    </ul>
   }
  )
}

 

 

 

 

 

 

Reference Error : example is not defined  : 정의되지 않은 변수에 접근 시 발생.

console.log(example);


Type mismatch :  올바르지 않은 자료형 타입으로 변수를 선언 시 발생

public static void main(String[] args) {
		byte test1 = 20;
        byte test2 = 10;
        byte test3 = 0;
        test3 = test1 + test2; // Type mismatch: cannot convert from int to byte 
}


Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException : 인덱스가 배열보다 크거나 음수일 때 

class Solution {
	public long[] solution(long x, int n) {
		long[] answer = {}; // 배열을 제대로 선언 long[] answer = new long[n]; 
		for (int i = 0; i < n; i++) {
			answer[i] = x * (i + 1);
		}
		return answer;
	}
}

class solution {
	public int[] solution(int x) {
    	int[] arr = {0, 1, 2, 3, 4};
		arr[5] = 4; // 5번째 index는 존재하지 않아 에러 발생
    }

 

Unreahable code : return 문 이후에 실행문을 실행한 경우

int plus(int x, int y){
	int result = x + y;
    return result;
    result ++; // return 문 뒤에 실행하여 오류 발생
}

 

 

ArithmeticException : 연산 시 나누기 0 을 한 경우

public static void main(String[] args) {
	int result = 10 / 0;
}

 


The local variable value may not have been initailized : 
초기화되지 않은 변수 사용 시

public class Example{
	int score;
    System.out.println(score);
}

 


 

728x90